


#ifndef LORISMESSENGER_H
#define LORISMESSENGER_H

#include <QIODevice>
#include <QDebug>
#include <QString>
#include <QTextCodec>

class LorisMessenger : public QIODevice
{
    Q_OBJECT
protected:
    qint64 readData(char *data, qint64 maxlen);
    qint64 writeData(const char *data, qint64 len);
    QTextCodec *mp_codec;
public:
    explicit LorisMessenger(QObject *parent = 0);
    bool isReadable();
signals:
    void message_string(QString);
public slots:
};

inline QDebug lorisMsg(LorisMessenger *p_msngr) {return QDebug(p_msngr);}

#endif // LORISMESSENGER_H

